part of 'article_bloc.dart';

// LoadArticle, CreateArticle, UpdateArticle, DeleteArticle, ToggleFavorite

sealed class ArticleEvent extends Equatable {
  const ArticleEvent();

  @override
  List<Object> get props => [];
}

class LoadArticleEvent extends ArticleEvent {
  final String slug;

  const LoadArticleEvent(this.slug);

  @override
  List<Object> get props => [slug];
}

class CreateArticleEvent extends ArticleEvent {
  final Article article;

  const CreateArticleEvent(this.article);

  @override
  List<Object> get props => [article];
}

class UpdateArticleEvent extends ArticleEvent {
  final String slug;
  final Article article;
  final Function() onComplete;

  const UpdateArticleEvent(this.slug, this.article, this.onComplete);

  @override
  List<Object> get props => [slug, article];
}

class DeleteArticleEvent extends ArticleEvent {
  final String slug;
  final Function() onComplete;

  const DeleteArticleEvent(this.slug,  this.onComplete);

  @override
  List<Object> get props => [slug];
}

class ToggleFavoriteEvent extends ArticleEvent {
  final String slug;
  

  const ToggleFavoriteEvent(this.slug);

  @override
  List<Object> get props => [slug];
}


